import { Segmented } from 'antd';
import { useState } from 'react';
import Material from '../Materail/index'
import Outline from '../Outline/index'
import Source from '../Source/index'
export default function MaterialWrapper() {
    const [key, setKey] = useState('物料')
  return (
    <div>
      <Segmented value={key} options={['物料','大纲','源码']} block onChange={(value) => { setKey(value) }} />
      <div className="pt-[20px] h-[calc(100vh-110px)]">
        {
          key === '物料' && <Material />
        }
        {
          key === '大纲' && <Outline />
        }
        {
          key === '源码' && <Source />
        }
      </div>
    </div>
  )
}
